/**
 * Copyright 2015 ABSir's Studio
 * 
 * All right reserved
 *
 * Create on 2015年5月4日 下午8:45:24
 */
package com.absir.upgrade;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.zip.ZipInputStream;

import com.absir.core.helper.HelperFile;
import com.absir.core.helper.HelperFileName;

/**
 * @author absir
 *
 */
public class UpgradeMain {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String... args) throws IOException {
		if (args.length < 2) {
			System.err.println("need srcDir destDir args");
		}

		String classPath = HelperFileName.getClassPath(UpgradeMain.class);
		HelperFile.copyDirectoryOverWrite(new ZipInputStream(new FileInputStream(HelperFileName.concat(classPath, args[0]))), new File(HelperFileName.concat(classPath, args[1])), true, null, true);
	}
}
